Conventionally, various image processing technologies are used in the FA (Factory Automation) field. In a typical image processing technology, based on image data obtained by imaging an inspection object, characters printed in the inspection object are recognized, or existence of a flaw is inspected in a surface of the inspection object.
In an actual production line, sometimes a gloss is reflected on a surface of the inspection object according to a lighting environment in imaging the inspection object, a shape of the inspection object, and a positional relationship between a lighting source and an imaging unit. The gloss means a region where image information indicating the inspection object cannot significantly be acquired due to an amount of light incident to a specific region of the inspection object. Typically, the incident light amount is relatively increased with respect to the specific region of the inspection object, which causes so-called halation or a state close to the halation. In such cases, information on the character or flaw on the inspection object cannot properly be acquired due to the gloss.
Therefore, for example, Japanese Unexamined Patent Publication No. 2007-170838 discloses a configuration of an appearance inspection apparatus including a lighting source that lights an appearance inspection object and imaging means for imaging the appearance inspection object lighted by the lighting source. Image retaining means and image processing means are provided in the configuration of the appearance inspection apparatus. The image retaining means retains plural images that are obtained by imaging the appearance inspection object by the imaging means while a lighting condition of the lighting source is changed. The image processing means performs arithmetic processing to the plural images retained by the mage retaining means, thereby producing an image in which the reflection of the lighting source is removed. More specifically, using a light emitting diode that is divided into four regions in units of 90 degrees about an optical axis of a lens, the lighting condition is changed by changing a combination of the actually lighting regions in the four regions constituting the light emitting diode.
In the method disclosed in Japanese Unexamined Patent Publication No. 2007-170838, it is necessary to prepare plural lighting sources having different irradiation directions, which results in a problem in that cost is relatively increased. At the same time, it is necessary to immobilize the inspection object during the imaging, which results in a problem in that the method is hardly applied to a production line in which the inspection object is continuously conveyed. Therefore, there is a limitation to the production line to which the method disclosed in Japanese Unexamined Patent Publication No. 2007-170838 can be applied.